package com.shopcentre15.shopcentre.FormalShopExplot.Service.Impl.Mchant;

import com.shopcentre15.shopcentre.FormalShopExplot.Dao.Mchant.MchantDao;
import com.shopcentre15.shopcentre.FormalShopExplot.Entity.ShopMerchant;
import com.shopcentre15.shopcentre.FormalShopExplot.Service.Mchant.MchantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MchantServiceImpl implements MchantService {
    @Autowired
    private MchantDao mchantDao;
    @Override
    public ShopMerchant mchantLogin(String account, String password) {
        if(account == null & password == null){
            return null;
        }
        ShopMerchant shopMerchant = mchantDao.mchantLogin(account, password);
        if(shopMerchant == null){
            return null;
        }
        return shopMerchant;
    }
}
